]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Add/document "height" optional property
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 26 Jan 2024 13:25:57 +0000 (14:25 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 29 Feb 2024 15:34:21 +0000 (16:34 +0100)
This will allow OSK descriptions to declare "tall" keys. May be
used in combination with the "start" property added in previous
commits, in case a gap needs to be explicitly left.

No OSK description uses this yet.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>

data/README.osk-layouts
js/ui/keyboard.js

index 88e746e4de9a8bf10ceed4d34518fa988f084f0d..8c58f62e4d64293cfe950254b61b04786ec57410 100644 (file)
@@ -63,7 +63,10 @@ it has the following structure:
     accepted.
   - width (Double): Relative width of the key in the
     row. 1 is for a square key. Multiples of 0.5 are
-    accepted.
+    accepted. The implicit default value is 1.
+  - height (Double): Relative height of the key in
+    the grid. The key will overflow downwards. Multiples
+    of 0.5 are accepted. The implicit default value is 1.
   - level (Integer): Level that the key switches to.
     See the levelSwitch action.
   - action (string): Action performed by the key,
index bf6317840100a04564a20354c59be69c7bf871b0..56c8d585ea99c7cdc9744d41dfba117a73686265 100644 (file)
@@ -1564,7 +1564,7 @@ export const Keyboard = GObject.registerClass({
             if (key.action || key.keyval)
                 button.keyButton.add_style_class_name('default-key');
 
-            layout.appendKey(button, key.width, 1, key.leftOffset);
+            layout.appendKey(button, key.width, key.height, key.leftOffset);
         }
     }